
// 标准响应结构（根据后端协议调整）
export interface ResponseData<T = unknown> {
    code: number
    data: T
    message?: string
    [key: string]: any // 灵活适应不同后端字段
}


export interface APIResourceItem {
    id: string;
    method:
    | 'GET'
    | 'POST'
    | 'PUT'
    | 'PATCH'
    | 'DELETE'
    | 'HEAD'
    | 'OPTIONS'
    | 'CONNECT'
    | 'TRACE';
    path: string;
    [key: string]: any
}

// 对应 GET /api/items/ 的响应类型
export type APIResourceListResponse = ResponseData<APIResourceItem[]>;

export type BaseUrlItem = {
    id: string;
    label: string;
    url: string;
    placeholder: string;
  }
